﻿<Window x:Class="Scrabble.Views.SelectPlayersView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowStartupLocation="CenterOwner" ResizeMode="NoResize"
        Height="250" Width="300">
    <Grid Margin="4">
        <Grid.Resources>
            <Style TargetType="Button">
                <Setter Property="MinWidth" Value="84" />
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="4" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="4" />
            <RowDefinition />
            <RowDefinition Height="4" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <TextBox x:Name="PlayerName" IsEnabled="{Binding CanAddMorePlayers}" />
        <Button x:Name="Add" Grid.Column="3" Content="_Add" />

        <ListBox x:Name="NamesOfPlayers" Grid.Row="2" SelectedIndex="{Binding SelectedIndex}" />
        <StackPanel Grid.Column="3" Grid.Row="2" >
            <StackPanel.Resources>
                <Style TargetType="Button">
                    <Setter Property="Margin" Value="0,0,0,4"/>
                    <Setter Property="VerticalAlignment" Value="Top"/>
                </Style>
            </StackPanel.Resources>
            <Button x:Name="Remove" Content="_Remove" />
            <Button x:Name="RemoveAll" Content="Remove _All" />
            <Label  />
            <Button x:Name="MoveUp" Content="Move _Up" />
            <Button x:Name="MoveDown" Content="Move _Down" />
        </StackPanel>

        <Button x:Name="Open" Grid.Row="5" Content="OK" HorizontalAlignment="Right" />
        <Button x:Name="Cancel" Grid.Column="3" Grid.Row="5" Content="Cancel" IsCancel="true" />
    </Grid>
</Window>
